\(\int (a+i a \tan (c+d x))^{5/2} \, dx\) [102]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F(-1)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 101 \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {4 i \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {4 i a^2 \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d} \]

[Out]

-4*I*a^(5/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)/d+4*I*a^2*(a+I*a*tan(d*x+c))^(1/2)/
d+2/3*I*a*(a+I*a*tan(d*x+c))^(3/2)/d

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3559, 3561, 212} \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {4 i \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {4 i a^2 \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d} \]

[In]

Int[(a + I*a*Tan[c + d*x])^(5/2),x]

[Out]

((-4*I)*Sqrt[2]*a^(5/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d + ((4*I)*a^2*Sqrt[a + I*a*Tan
[c + d*x]])/d + (((2*I)/3)*a*(a + I*a*Tan[c + d*x])^(3/2))/d

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3559

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((a + b*Tan[c + d*x])^(n - 1)/(d*(n - 1))
), x] + Dist[2*a, Int[(a + b*Tan[c + d*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && G
tQ[n, 1]

Rule 3561

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d}+(2 a) \int (a+i a \tan (c+d x))^{3/2} \, dx \\ & = \frac {4 i a^2 \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d}+\left (4 a^2\right ) \int \sqrt {a+i a \tan (c+d x)} \, dx \\ & = \frac {4 i a^2 \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d}-\frac {\left (8 i a^3\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d} \\ & = -\frac {4 i \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {4 i a^2 \sqrt {a+i a \tan (c+d x)}}{d}+\frac {2 i a (a+i a \tan (c+d x))^{3/2}}{3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.35 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.82 \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {12 i \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )+2 a^2 (-7 i+\tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{3 d} \]

[In]

Integrate[(a + I*a*Tan[c + d*x])^(5/2),x]

[Out]

-1/3*((12*I)*Sqrt[2]*a^(5/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])] + 2*a^2*(-7*I + Tan[c + d*x
])*Sqrt[a + I*a*Tan[c + d*x]])/d

Maple [A] (verified)

Time = 0.71 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.72

method result size
derivativedivides \(\frac {2 i a \left (\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}+2 a \sqrt {a +i a \tan \left (d x +c \right )}-2 a^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d}\) \(73\)
default \(\frac {2 i a \left (\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}+2 a \sqrt {a +i a \tan \left (d x +c \right )}-2 a^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d}\) \(73\)

[In]

int((a+I*a*tan(d*x+c))^(5/2),x,method=_RETURNVERBOSE)

[Out]

2*I/d*a*(1/3*(a+I*a*tan(d*x+c))^(3/2)+2*a*(a+I*a*tan(d*x+c))^(1/2)-2*a^(3/2)*2^(1/2)*arctanh(1/2*(a+I*a*tan(d*
x+c))^(1/2)*2^(1/2)/a^(1/2)))

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 271 vs. \(2 (74) = 148\).

Time = 0.25 (sec) , antiderivative size = 271, normalized size of antiderivative = 2.68 \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=\frac {2 \, {\left (3 \, \sqrt {2} \sqrt {-\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {-\frac {a^{5}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) - 3 \, \sqrt {2} \sqrt {-\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {-\frac {a^{5}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) - 2 \, \sqrt {2} {\left (-4 i \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 3 i \, a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )}}{3 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

[In]

integrate((a+I*a*tan(d*x+c))^(5/2),x, algorithm="fricas")

[Out]

2/3*(3*sqrt(2)*sqrt(-a^5/d^2)*(d*e^(2*I*d*x + 2*I*c) + d)*log(4*(a^3*e^(I*d*x + I*c) + sqrt(-a^5/d^2)*(I*d*e^(
2*I*d*x + 2*I*c) + I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a^2) - 3*sqrt(2)*sqrt(-a^5/d^2)*(d
*e^(2*I*d*x + 2*I*c) + d)*log(4*(a^3*e^(I*d*x + I*c) + sqrt(-a^5/d^2)*(-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(a/
(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a^2) - 2*sqrt(2)*(-4*I*a^2*e^(3*I*d*x + 3*I*c) - 3*I*a^2*e^(I*d*x
 + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))/(d*e^(2*I*d*x + 2*I*c) + d)

Sympy [F]

\[ \int (a+i a \tan (c+d x))^{5/2} \, dx=\int \left (i a \tan {\left (c + d x \right )} + a\right )^{\frac {5}{2}}\, dx \]

[In]

integrate((a+I*a*tan(d*x+c))**(5/2),x)

[Out]

Integral((I*a*tan(c + d*x) + a)**(5/2), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00 \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=\frac {2 i \, {\left (3 \, \sqrt {2} a^{\frac {7}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a^{2} + 6 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{3}\right )}}{3 \, a d} \]

[In]

integrate((a+I*a*tan(d*x+c))^(5/2),x, algorithm="maxima")

[Out]

2/3*I*(3*sqrt(2)*a^(7/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(d
*x + c) + a))) + (I*a*tan(d*x + c) + a)^(3/2)*a^2 + 6*sqrt(I*a*tan(d*x + c) + a)*a^3)/(a*d)

Giac [F(-1)]

Timed out. \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=\text {Timed out} \]

[In]

integrate((a+I*a*tan(d*x+c))^(5/2),x, algorithm="giac")

[Out]

Timed out

Mupad [B] (verification not implemented)

Time = 4.73 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.83 \[ \int (a+i a \tan (c+d x))^{5/2} \, dx=\frac {a^2\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,4{}\mathrm {i}}{d}+\frac {a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}\,2{}\mathrm {i}}{3\,d}-\frac {\sqrt {2}\,{\left (-a\right )}^{5/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,4{}\mathrm {i}}{d} \]

[In]

int((a + a*tan(c + d*x)*1i)^(5/2),x)

[Out]

(a^2*(a + a*tan(c + d*x)*1i)^(1/2)*4i)/d + (a*(a + a*tan(c + d*x)*1i)^(3/2)*2i)/(3*d) - (2^(1/2)*(-a)^(5/2)*at
an((2^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*(-a)^(1/2)))*4i)/d